package com.ysj.demo.accompanynetwork.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * 发布页的两个Fragment
 * Created by 80530 on 2018/8/6.
 */

public class PublishTabFragmentPagerAdapter extends FragmentPagerAdapter {
    private List<Fragment> mList;

    public PublishTabFragmentPagerAdapter(FragmentManager fm, List<Fragment> list) {
        super(fm);
        this.mList = list;
    }

    @Override
    public Fragment getItem(int arg0) {
        return mList.get(arg0);//显示第几个页面
    }

    @Override
    public int getCount() {
        return mList.size();//有几个页面
    }

}
